]> dgit.raspbian.org Git - gnome-shell.git/commit
screenshot: Add API to screenshot stage to a ClutterContent
authorIvan Molodetskikh <yalterz@gmail.com>
Sat, 15 Jan 2022 15:22:44 +0000 (18:22 +0300)
committerMarge Bot <marge-bot@gnome.org>
Thu, 27 Jan 2022 22:25:42 +0000 (22:25 +0000)
commitdeb614a031b1e0ec3811f537bc7138dd18a02fc3
treea47979115dbb0020edfed17f1196b851a0744924
parent71c6918588042e878b325af1735d9a792b490b69
screenshot: Add API to screenshot stage to a ClutterContent

As mentioned in the last commit, we'll split up taking screenshots into
creating a GPU texture first, and later saving that to disk as a PNG.

For individual windows it's already easy to get a ClutterContent with
the texture using meta_window_actor_paint_to_content (), for the stage
it's not that easy and involves a few extra steps including X11 specific
ones.

So introduce a new ShellScreenshot API which does all that and provides
the caller with a ClutterContent of the stage:
shell_screenshot_screenshot_stage_to_content ()

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
src/shell-screenshot.c
src/shell-screenshot.h